package com.whj.apidriver.remote;

import com.whj.internalcommon.dto.*;
import com.whj.internalcommon.response.DriverUserExistsResponse;
import javafx.geometry.Pos;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/12 - 01 - 12 - 14:01 
 * @Description: com.whj.apidriver.remote
 */

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {
    @RequestMapping(method = RequestMethod.PUT, value = "/user")
    ResponseResult updateDriverUser(@RequestBody DriverUser driverUser);

    @RequestMapping(method = RequestMethod.GET, value = "/check-driver/{driverPhone}")
    ResponseResult<DriverUserExistsResponse> getDriverUser(@PathVariable("driverPhone") String driverPhone);

    @RequestMapping(method = RequestMethod.GET, value = "/car")
    ResponseResult<Car> getCarById(@RequestParam Long carId);

    @RequestMapping(method = RequestMethod.POST,value = "/driver-user-work-status")
    ResponseResult changeWorkStatus(@RequestBody DriverUserWorkStatus driverUserWorkStatus);

    @RequestMapping(method = RequestMethod.GET,value = "/driver-car-binding-relationship")
    ResponseResult<DriverCarBindingRelationship> findMessage(@RequestParam String driverPhone);

    @GetMapping("/work-status")
    ResponseResult<DriverUserWorkStatus> getWorkStatus(@RequestParam Long driverId);
}
